package com.wyq.new_springboot.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author Mr Wei
 * @since 2021-03-25
 */
public class TBlog implements Serializable {

    private static final long serialVersionUID = 1L;

    public TBlog() {
    }

    public TBlog(Integer id, Integer uid, String title, String type, String content, LocalDateTime createTime, Integer state) {
        this.id = id;
        this.uid = uid;
        this.title = title;
        this.type = type;
        this.content = content;
        this.createTime = createTime;
        this.state = state;
    }

    /**
     * 博客id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 用户id
     */
    private Integer uid;

    /**
     * 标题
     */
    private String title;

    /**
     * 分类
     */
    private String type;

    /**
     * 内容
     */
    private String content;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    /**
     * 1为发布，0为草稿
     */
    private Integer state;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUid() {
        return uid;
    }

    public void setUid(Integer uid) {
        this.uid = uid;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    @Override
    public String toString() {
        return "TBlog{" +
        "id=" + id +
        ", uid=" + uid +
        ", title=" + title +
        ", type=" + type +
        ", content=" + content +
        ", createTime=" + createTime +
        ", state=" + state +
        "}";
    }
}
